import { ApiModelProperty } from "@nestjs/swagger"
import { prop } from "@typegoose/typegoose"
import { IsNotEmpty, IsUrl } from "class-validator"

export class Action {
  @ApiModelProperty({ description: '活动标题', example: '十点抢劵' })
  @prop()
  @IsNotEmpty({ message: '请填写活动标题' })
  title!: string
  
  @ApiModelProperty({ description: '活动图标', example: 'https://s10.mogucdn.com/mlcdn/c45406/180913_036dli57aah85cb82l1jj722g887g_225x225.png' })
  @prop()
  @IsUrl()
  @IsNotEmpty({ message: '请填写活动图标' })
  icon!: string
}